<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>  
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<h3 pid="0" id="0" level="0" childrenLevel="1" path="">
	<i name='icon' class='glyphicon glyphicon-plus' pid="0"></i> 
	<span class='label label-primary' isUsed="0">资源列表</span> &nbsp;&nbsp; 
	<span class='btnAry'>
		<button class='btn btn-danger btn-xs' data-toggle='modal'
			data-target='#myModal' name='addResource'>添加子节点</button>
	</span>
</h3>
<c:forEach items="${menuList}" var="menu">
	<h3 pid="${menu.parentId}" id="${menu.id}" level="${menu.level}" childrenLevel="${menu.level+1}" path="${menu.path}">
		<i name='icon' class='glyphicon glyphicon-plus' pid="${menu.parentId}"></i>
		<c:if test="${menu.isUsed==1}">
			<span class='label label-primary' isUsed="${menu.isUsed}">${menu.name}</span>
											&nbsp;&nbsp;
											<span class='btnAry'>
				<button class='btn btn-success btn-xs' data-toggle='modal'
					data-target='#myModal' name='editResource'>编辑</button> <c:if
					test="${menu.isUsed==0}">
					<button class='btn btn-success btn-xs' name='disabledResource'
						isUsed=1>恢复</button>
				</c:if> <c:if test="${menu.isUsed==1}">
					<button class='btn btn-info btn-xs' name='disabledResource'
						isUsed=0>禁用</button>
				</c:if>
				<button class='btn btn-danger btn-xs' name='deleteResource'>删除</button>
				<button class='btn btn-danger btn-xs' data-toggle='modal'
					data-target='#myModal' name='addResource'>添加子节点</button> <!-- 
													<button class='btn btn-info btn-xs' name='orderResource' order='1'>上移</button>
													<button class='btn btn-info btn-xs' name='orderResource'  order='0'>下移</button> 
													-->
			</span>
		</c:if>
		<c:if test="${menu.isUsed==0}">
			<span class='label label-default' isUsed="${menu.isUsed}">${menu.name}</span>
											&nbsp;&nbsp;
											<span class='btnAry'><button
					class='btn btn-success btn-xs' name='disabledResource' isUsed=1>恢复</button></span>
		</c:if>
	</h3>
	 <jsp:include page="tree.jsp"/>
</c:forEach>